import getCode  from '@/plugins/DDAuthCode'

export default {
    namespaced: true,
    state:{
        isShowTransitionPage: true,
        ddCode:"",
    },
    getters: {
        isShowTransitionPage: state => state.isShowTransitionPage,
        ddCode: state => state.ddCode,
    },
    mutations: {
        UPDATA_ISSHOWTRANSITIONPAGE(state, param) {
            state.isShowTransitionPage = param
        },
        UPDATA_DD_CODE(state, param) {
            state.ddCode = param
        },
    },
    actions:{
        updateIsShowTransitionPage ({ commit }, param) {
            commit('UPDATA_ISSHOWTRANSITIONPAGE', param)
        },
        async getPermission({ commit }) {
            let ddCode = await getCode()
            commit('UPDATA_DD_CODE', ddCode)
        }
    }
}